package no.somenvm.dreamplanners.util

import org.bukkit.entity.Player
import priv.seventeen.artist.dreampainter.api.screen.IScreen

fun IScreen.sendVariable(player: Player, key: String, value: Any){
    runScript(player,"var.$key = $value")
}

fun IScreen.sendVariables(player: Player, key: String, values: List<*>?){
    runScript(player,"var.$key = List[]")
    values?.let {
        for (value in it){
            runScript(player,"var.$key.add($value)")
        }
    }

}